/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

import request from '@/router/axios'

export function brandList(obj) {
  return request({
    url: '/api/report/report/brandList',
    method: 'post',
    data: obj
  })
}

export function repurchase(obj) {
  return request({
    url: '/api/report/report/repurchase',
    method: 'post',
    data: obj
  })
}

export function saleStatement(obj) {
  return request({
    url: '/api/report/report/saleStatement',
    method: 'post',
    data: obj
  })
}

export function saleActivity(obj) {
  return request({
    url: '/api/report/report/saleActivity',
    method: 'post',
    data: obj
  })
}

// 渠道类型
export function fetchChannelList(obj) {
  return request({
    url: '/api/basic/channel/displaylist',
    method: 'get',
    data: obj
  })
}

// 1.0客户RFM报表查询
export function getMemberRFMReport(obj) {
  return request({
    url: '/api/report/report/getMemberRFMReport',
    method: 'post',
    data: obj
  })
}
// 1.0客户RFM报表导出
export function exportMemberRFMReport(obj) {
  return request({
    url: '/api/report/report/exportMemberRFMReport',
    method: 'post',
    data: obj
  })
}
// 1.1 首次注册渠道报表
export function getRegisterMemberReport(obj) {
  return request({
    url: '/api/report/report/getRegisterMemberReport',
    method: 'post',
    data: obj
  })
}
// 1.1 首次注册渠道报表
export function exportRegisterMemberReport(obj) {
  return request({
    url: '/api/report/report/exportRegisterMemberReport',
    method: 'post',
    data: obj
  })
}
// 1.2不同渠道会员注册情况报表
export function getReportMemberRegisterByChannel(obj) {
  return request({
    url: '/api/report/report/getReportMemberRegisterByChannel',
    method: 'post',
    data: obj
  })
}
// 1.2不同渠道会员注册情况报表
export function exportReportMemberRegisterByChannel(obj) {
  return request({
    url: '/api/report/report/exportMemberRegisterByChannel',
    method: 'post',
    data: obj
  })
}

// 1.3 用户统计报告报表
export function getReportMemberStatement(obj) {
  return request({
    url: '/api/report/report/getReportMemberStatement',
    method: 'post',
    data: obj
  })
}
// 1.3 用户统计报告报表
export function exportMemberStatement(obj) {
  return request({
    url: '/api/report/report/exportMemberStatement',
    method: 'post',
    data: obj
  })
}
// 1.4 新老会员的会员销售报表
export function getReportMemberSales(obj) {
  return request({
    url: '/api/report/report/getReportMemberSales',
    method: 'post',
    data: obj
  })
}
// 1.4 新老会员的会员销售报表
export function exportMemberSales(obj) {
  return request({
    url: '/api/report/report/exportMemberSales',
    method: 'post',
    data: obj
  })
}
// 1.5 不同等级的会员销售报表
export function getReportMemberSalesByLevel(obj) {
  return request({
    url: '/api/report/report/getReportMemberSalesByLevel',
    method: 'post',
    data: obj
  })
}
// 1.5 不同等级的会员销售报表
export function exportMemberSalesByLevel(obj) {
  return request({
    url: '/api/report/report/exportMemberSalesByLevel',
    method: 'post',
    data: obj
  })
}
// 1.6 积分日常报表
export function getReportPointStatement(obj) {
  return request({
    url: '/api/report/report/getReportPointStatement',
    method: 'post',
    data: obj
  })
}
// 1.6 积分日常报表
export function exportPointStatement(obj) {
  return request({
    url: '/api/report/report/exportPointStatement',
    method: 'post',
    data: obj
  })
}
// 1.7 月度会员日积分报表
export function getReportPointMemberDays(obj) {
  return request({
    url: '/api/report/report/getReportPointMemberDays',
    method: 'post',
    data: obj
  })
}
// 1.7 月度会员日积分报表
export function exportPointMemberDays(obj) {
  return request({
    url: '/api/report/report/exportPointMemberDays',
    method: 'post',
    data: obj
  })
}
// 1.8 会员升降级报表
export function getReportMemberLevelChange(obj) {
  return request({
    url: '/api/report/report/getReportMemberLevelChange',
    method: 'post',
    data: obj
  })
}
// 1.8 会员升降级报表
export function exportMemberLevelChange(obj) {
  return request({
    url: '/api/report/report/exportMemberLevelChange',
    method: 'post',
    data: obj
  })
}
